<?php
/*
Engineer: Alex Arey
Updated: 12/2/2011
Description: Displays list of all internships and controls to community partner

*/


 ?>

<div style = "display: inline;">

<h5>Search internship requests</h5>
<?php
$this->form->setAction($this->url());
echo $this->form;
?>
</div>
<?php if($this->positions):?>
<h3>Your internship requests:</h3>
<table>
    <tr>
        <th>Position</th>
        <th>Term</th>
        <th>Positions Requested</th>
        <th>Positions Possible</th>
    </tr>
    <tr>
    <?php foreach($this->positions as $pos): ?>
    <tr>
        <td align="center"><a href="
		<?php echo $this->url(array('controller'=>'common','action'=>'viewinternshipdetails','posid'=>$pos['POSID'])); ?>
		"><?php echo $pos['NAME'] ?></a></td>
	<td align="center"><?php echo $pos['TERM'] ?></td>
        <td align="center"><?php echo $pos['POSITIONSREQUESTED'] ?></td>
	<td align="center"><?php echo $pos['POSITIONSGRANTED'] ?></td>  	
    </tr>
    <?php endforeach ?>
    </tr>
<?php endif; ?>
<?php if(!$this->positions):?>
	<h3>No internship requests found.</h3>
<?php endif; ?>
</table>

